package com.lyw.springCloud.controller;

import com.lyw.springCloud.domain.CommonResult;
import com.lyw.springCloud.domain.Order;
import com.lyw.springCloud.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Auther liyawei
 * @Date 2022/5/21 10:00
 */

@Slf4j
@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order) {

        orderService.create(order);
        return new CommonResult(200, "订单创建完成!");
    }
}
